<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<script src="../js/jquery-3.5.1.min.js" type="text/javascript" charset="utf-8"></script>
	<body>
		<input type="text" class="p1" value="重庆市"><br>
		<input type="text" class="p2" value="巴南区"><br>
		<button type="button" class="b1">检测</button>
		<script type="text/javascript">
			$(function(){
				$(".b1").click(function(){
					alert($(".p1").val() + "，" + $(".p2").val());
				})
			})
		</script>
	</body>
</html>
